<?php
class Util
{
	public static function filterStr($str)
	{
		
	}
	
	public static function getTpl()
	{
		$tpl = new Smarty();
		$tpl->template_dir = ROOT_DIR . 'Templates/';
		$tpl->cache_dir = ROOT_DIR . 'Templates/cache/';
		$tpl->config_dir = ROOT_DIR . 'Templates/config/';
		$tpl->compile_dir = ROOT_DIR . 'Templates/compile/';
		$tpl->left_delimiter = '<{';
		$tpl->right_delimiter = '}>';
		return $tpl;
	}
	
	public static function hashData($data, $num)
	{
		$hash = sprintf('%u', crc32('dfasdfe'));
		$hash = intval($hash / $num);
		$hash = intval($hash % $num);
		$hash = dechex($hash);
		return sprintf('%02s', $hash);
	}
}